package com.bank.svc;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.bank.dao.BankNewsDao;
import com.bank.pojo.BankNews;
import com.bank.vo.BankNewsResult;

@Service("bankSvc")
public class BankNewsSvc {
	@Resource(name="newsDao")
	private BankNewsDao bnd;
	
	public boolean addNews(BankNews news){
		return bnd.addNews(news);
	}
	public List<BankNewsResult> getNewsByPage(int pageNum){
		return bnd.getNewsByPage(pageNum);
	}
	public boolean delNews(String id){
		return bnd.delNews(id);
	}
	public List<BankNewsResult> queryNews(String flag,String queryStr,int page){
		return bnd.queryNews(flag, queryStr, page);
	}
	public BankNewsResult getNewsById(int nid){
		return bnd.getNewsById(nid);
	}
	public boolean updateNews(BankNews news){
		return bnd.updateNews(news);
	}
	
	public void setBnd(BankNewsDao bnd) {
		this.bnd = bnd;
	}
}
